<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1.Array.from("伪数组")
        // 2.Array.of() 创建一个数组
        // let arr = Array.of(1,2,3)
        // console.log(arr)
        // 3.find 数组里查找某一项
        // let arr = [1,2,2,2,3,4,5,6]
        // let res = arr.find(item => item == 2)

        // let res = arr.filter(item => item == 2)
        // console.log(res)
        // 4.findeIndex查找某个值的索引
        // let arr = ['卡莎', '莎米拉', '黑默丁格']
        // let res = arr.findIndex(item => item == "卡莎")
        // console.log(res)

        // 5.includes判断数组里面是否包含某个值，返回布尔值
        // let arr = ['卡莎', '莎米拉', '黑默丁格']
        // let res = arr.includes("卡莎")
        // console.log(res)

        // 6.flat使数组扁平化
        // let arr = [1,[2,[3,[4]]]]
        // // flat默认参数是1
        // let res = arr.flat(3)
        // console.log(res)
        // 7.at获取数组中某一项，值可以为负数表示从后往前
        // let arr = [1,2,3,4,5,6]
        // let res = arr.at(-1)
        // console.log(res)
        // 8.fill填充数组
        // let arr = [1,2,3,4,5,6]
        // arr.fill('a', 1,4)
        // console.log(arr)
        

    </script>
</body>
</html>